package com.daedalus.Polimorfizmi.InterfaceAbstractShape;

public abstract class ThreeDimensionalShape implements Shape{
double dimension;
	
	public ThreeDimensionalShape(double dim){
		setDimension(dim);
	}
	
	public double getDimension(){
		return dimension;
	}
	@Override
	public void setDimension(double dim) {
		dimension=dim>0.0?dim:0.0;		
	}

	public abstract double getArea();
	public abstract double getVolume();
	
	public String toString(){
		return String.format("Object: ThreeDimensional \nDimension: %.2f\n", getDimension());
	}
}
